<h1>Listing incidents</h1>

<table>
  <tr>
    <th>Type d'incident</th>
    <th>D&eacute;tails</th>
    <th>R&eacute;solution</th>
    <th>Cr&eacute;ation</th>
    <th>Mise &agrave; jour</th>
    <th colspan="3">Options</th>
  </tr>

<% for incident in @incidents %>
  <tr>
    <td><%=h incident.kind %></td>
    <td><%=h incident.data %></td>
    <td><%=h incident.resolve %></td>
    <td><%=h incident.created_at %></td>
    <td><%=h incident.updated_at %></td>
    <td><%= link_to 'Consulter', incident_path(incident) %></td>
    <% if authenticated? -%>
	    <td><%= link_to 'Modifier', edit_incident_path(incident) %></td>
	    <td><%= link_to 'Supprimer', incident_path(incident), :confirm => '&Ecirc;tes-vous s&ucirc;r(e) de vouloir supprimer cet incident ?', :method => :delete %></td>
	<% end -%>
  </tr>
<% end %>
</table>

<br />
<% if authenticated? -%>
	<%= link_to 'Ajouter un incident', new_incident_path %>
<% end -%>